package com.sghj.utils.desensitization;

/**
 * @author xrx
 * @Date 2022/9/15
 * @apiNote
 */
public class PhoneRule extends BaseRule {

    /**
     * 仅显示前3位和后4位
     */
    @Override
    void initRule() {
        setRule(new RuleItem()
                .setRegex("(\\d{3})\\d*(\\d{4})")
                .setFormat("$1****$2"));
    }
}
